﻿#pragma once
#include "common_data.h"

namespace stack {
	struct StackInfo {
		int id;
		QString name;
		int maxNum;
		int cengNum;
	};
	struct SkuShapPos {
		int id;
		int group;
		int wx;
		int wy;
		int lx;
		int ly;
		int za;
		int typex;
		int typey;
		bool operator < (const SkuShapPos& in)
		{
			return id < in.id;
		}
	};

	struct SkuFixPos {
		int id;
		int group;
		int x;
		int y;
		int z;
		int za;
		bool operator < (const SkuFixPos& in)
		{
			return id < in.id;
		}
	};
	union SkuPos {
		SkuFixPos fix;
		SkuShapPos shap;
	};

	struct StackCfg {
		int id;
		QString name;
		int maxNum;
		int gap;
		int shap;
		Size sku;	// 对shap = 0 时该值生效
		QList<SkuPos> pos; // 物料坐标数据
		int evenType;	// 偶数层对称方式，0：不变化 1：X轴对称 2：Y轴对称 3：旋转180
	};

	struct SkuPosInfo {
		int id;
		int group;
		int x;
		int y;
		int z;
		int za;
	};

	enum class EvenType {
		even_no = 0,
		even_x_symmetry = 1,
		even_y_symmetry = 2,
		even_rotate_180 = 3,
		even_x_pos_symmetry = 4,
		even_y_pos_symmetry = 5,

	};

}

